#region Imports

using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;

#endregion 

namespace EBAYVN.Util
{
	/// <summary>
	/// Summary description for SystemConvert.
	/// </summary>
	public class ConvertUtil
	{
        /// <summary>
        /// CleanTextHTML
        /// </summary>
        /// <param name="inputString"></param>
        /// <returns></returns>
        public static string CleanTextHTML2(string inputString)
        {
            StringBuilder retVal = new StringBuilder();

            if ((inputString != null) && (inputString != String.Empty))
            {
                inputString = inputString.Trim();

                for (int i = 0; i < inputString.Length; i++)
                {
                    switch (inputString[i])
                    {
                        case '"':
                            retVal.Append(" ");
                            break;
                        default:
                            retVal.Append(inputString[i]);
                            break;
                    }
                }
                retVal.Replace("'", " ");
                retVal.Replace("\r\n", "<br />");
            }

            return retVal.ToString();
        }
        public static int? ToInteger(string str)
        {
            var result = (int?)null;

            try
            {
                result = int.Parse(str);
            }
            catch
            {
            }

            return result;
        }
	}
}
